package com.suxin.call_service_hello_ribbion.controller;

import com.suxin.call_service_hello_ribbion.remoteService.HelloService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {


    private Logger logger = LoggerFactory.getLogger(HelloController.class);

    @Autowired
    private HelloService helloService;


    @GetMapping(value = "hi")
    public String hello(@RequestParam(value = "name") String name) {
        logger.info("call_service_hello_ribbon 被调用，参数 name:{}", name);
        return helloService.hello(name);
    }
}
